package com.liang.countdownlatch;

import java.util.concurrent.CountDownLatch;

public class Children extends Thread{

    private CountDownLatch countDownLatch;
    public Children(CountDownLatch countDownLatch) {
        this.countDownLatch = countDownLatch;
    }
    @Override
    public void run() {

        for (int i = 1;i<=10;i++) {
            System.out.println(getName()+"正在吃第"+i+"个饺子");
        }

        countDownLatch.countDown();
    }
}